import turtle

def draw_star():
    # 创建最基础的绘图对象
    t = turtle.Turtle()
    screen = turtle.Screen()
    
    # 设置基本参数
    t.color("red")
    t.speed(2)
    
    # 绘制五角星
    t.begin_fill()
    for _ in range(5):
        t.forward(200)
        t.right(144)
    t.end_fill()
    
    # 点击关闭窗口
    screen.exitonclick()

if __name__ == "__main__":
    try:
        draw_star()
    except Exception as e:
        print(f"程序出错: {str(e)}")
        input("按回车键退出...")  # 让窗口停留以便查看错误
    